<?php
require_once("config.php");
require_once _SRC_."/domain/Category.php";
require_once(_SRC_."/dao/CategoryDao.php");

require_once(_SRC_."/dao/PageDao.php");
require_once(_SRC_."/domain/PageTemplate.php");
require_once(_SRC_."/dao/PageTemplateDao.php");

require_once("header.php");
?>

<?php
	$pageId = $_GET["pageId"];
	$pageDao = new PageDao();
	$page = $pageDao->getPage($pageId);

	$pageTemplateDao = new PageTemplateDao();
	$pageTemplate = $pageTemplateDao->getPageTemplate($page->templateId);

	require_once("resources/templates/".$pageTemplate->path);
?>

<?php
require_once("footer.php");
?>